package com.global.domain;

import java.util.Date;

import javax.validation.constraints.Max;

import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;

/**   
 *  
 * @Description:  [用户身份信息]   
 * @Author:       [Joly_Huang]   
 * @CreateDate:   [2014年2月24日 上午9:55:24]   
 * @UpdateUser:   [Joly_Huang]   
 * @UpdateDate:   [2014年2月24日 上午9:55:24]   
 * @UpdateRemark: [说明本次修改内容]  
 * @Version:      [v1.0] 
 *    
 */
public class Cif {
	
	private int id;
	@Length(min=1,max=40,message="cifName length error")
	private String cifName;
	@Max(value=200)
	private int age;
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date birthday;
	
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public int getAge() {
		return age;
	}
	public String getCifName() {
		return cifName;
	}
	public void setCifName(String cifName) {
		this.cifName = cifName;
	}
	public void setAge(int age) {
		this.age = age;
	}
	public Date getBirthday() {
		return birthday;
	}
	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + id;
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Cif other = (Cif) obj;
		if (id != other.id)
			return false;
		return true;
	}
	
	
	@Override
	public String toString() {
		return "Cif [id=" + id + ", cifName=" + cifName + ", age=" + age
				+ ", birthday=" + birthday + "]";
	}
	
}
